package com.bigflexlib.ds.op
{
	import mx.collections.ArrayCollection;
	import mx.collections.IList;
	
	import com.bigflexlib.ds.container.IRContainer;

	public class AbstractContainerToListOp extends AbstractContainerOp
	{
		
		
		
		protected var oList:IList;		
		
		
		
		public function AbstractContainerToListOp(iContainer:IRContainer, oList:IList)
		{
			super(iContainer);
			
			this.oList = oList;
			
		}
		
		
		
		
		// convenience
		protected function oList_autoUpdate( enable:Boolean ):void
		{

			var ac:ArrayCollection = oList as ArrayCollection;
			
			if ( ac == null )
				return;
				
			if ( enable )
				ac.enableAutoUpdate();
			else
				ac.disableAutoUpdate();
		
		}		
				
		
		override public function dispose( ):void
		{
			super.dispose( );
			oList = null;
		}
		
		
		
		
	}
}